package data;

import static data.Insert.updata;

public class Delete {
    //删除一个翻译员
    public static boolean profile(String id){
        String sql="DELETE FROM translator WHERE id=?;";
        String[] strings={id};

        return updata(sql,strings);
    }

    //删除一座城市
    public static boolean city(String city){
        String sql="DELETE FROM city WHERE name=?;";
        String[] strings={city};

        return updata(sql,strings);
    }

    //删除一门语言
    public static boolean language(String language){
        String sql="DELETE FROM language WHERE name=?;";

        String[] strings={language};

        return updata(sql,strings);
    }

    //删除一个gallery
    public static boolean gallery(String gid,String tid){
        String sql="DELETE FROM gallery WHERE id=? AND tid=?;";

        String[] strings={gid,tid};

        return updata(sql,strings);
    }

    //删除一个review
    public static boolean review(String rid,String tid){
        String sql="DELETE FROM review WHERE id=? AND tid=?;";

        String[] strings={rid,tid};

        return updata(sql,strings);
    }
}
